package cn.yeziji.forum.controller;

import cn.yeziji.forum.common.ForumResult;
import cn.yeziji.forum.dao.intf.MerchantWechatPayInfoDao;
import cn.yeziji.forum.dto.pay.merchant.MerchantWechatPayInfoDTO;
import cn.yeziji.forum.utils.ForumResultUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 商户微信支付信息 控制器
 *
 * @author gzkemays
 * @since 2023/07/25 23:28
 **/
@RestController
@RequestMapping("/merchant")
public class MerchantWechatPayInfoController {
  @Resource
  private MerchantWechatPayInfoDao merchantWechatPayInfoDao;

  @PostMapping("/save")
  public ForumResult save(@RequestBody MerchantWechatPayInfoDTO infoDTO) {
    return ForumResultUtils.ok(merchantWechatPayInfoDao.save(infoDTO));
  }
}
